package com.zmc.order.feign;

import com.zmc.common.domain.query.coupon.CouponFeignQuery;
import com.zmc.common.domain.vo.coupon.CouponReduceVo;
import com.zmc.common.domain.vo.coupon.CouponUpdateVo;
import com.zmc.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author：zmc
 * @Date：2024/12/12 17:11
 */

@FeignClient("mall-coupon")
public interface CouponFeignService {

    /**
     *
     * 获取优惠卷、满减、以及阶梯价格等优惠活动
     */
    @PostMapping("/activity/coupon/detail")
    public R getCouponDetail(@RequestBody CouponFeignQuery query);

    /**
     * 使用优惠卷
     */
    @PostMapping("/activity/coupon/reduce")
    public R couponReduce(@RequestBody CouponReduceVo vo);

    /**
     * 分单完成, 同步优惠卷orderSn（由总订单更新至分单后订单）
     * */
    @PostMapping("/activity/coupon/update/history")
    public R updateCouponHistory(@RequestBody CouponUpdateVo vo);
}
